home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / netz / ums / ums-beta / ums-install < prev    next >
Text File  |  1995-08-03  |  13KB  |  609 lines

  1. ; $VER Install-UMS 11 (3.8.95)
  2.  
  3. ( if (= @language "english")
  4. (
  5.   (set #intro
  6.   (cat "Installing Universal Message System V11..."
  7.   ))
  8.   (set #info
  9.   (cat "This installation script only configures a basic UMS system with "
  10.         "only one single user and no newsfeeds.\n\n"
  11.  
  12.         "In order to run a point on any network you need to install "
  13.         "the required network drivers.\n\n"
  14.   ))
  15.   (set #dest
  16.   (cat "In which disk or drawer should Universal Message System be "
  17.        "installed?\n\n"
  18.  
  19.        "(This script does not create a sub drawer for UMS).\n\n"
  20.  
  21.        "You can install in place (just select ok)."
  22.   ))
  23.   (set #envoy
  24.   (cat "Do you want to run UMS server on this machine or do you want "
  25.        "to access the message base over a local area network using "
  26.        "the networking software Envoy?"
  27.   ))
  28.   (set #amitcp
  29.   (cat "Do you want to run UMS server on this machine or do you want "
  30.        "to access the message base over a local area network using "
  31.        "the networking software AmiTCP?"
  32.   ))
  33.   (set #localmb
  34.   (cat "message base is on this machine"
  35.   ))
  36.   (set #remotemb
  37.   (cat "message base is accessed via network"
  38.   ))
  39.   (set #umsservice
  40.   (cat "Do you want to export UMS as an Envoy service?\n"
  41.        "(This enables other machines in a local area network "
  42.        "to use the message base of this machine over the net)"
  43.   ))
  44.   (set #umsd
  45.   (cat "Do you want to export UMS using TCP/IP?\n"
  46.        "(This enables other machines in a local area network "
  47.        "to use the message base of this machine over the net)"
  48.   ))
  49.   (set #insthgrexx
  50.   (cat "Installing hgrexxsupport.library"
  51.   ))
  52.   (set #instrexxdos
  53.   (cat "Installing rexxdossupport.library"
  54.   ))
  55.   (set #instflush
  56.   (cat "Installing flush.library"
  57.   ))
  58.   (set #instumslib
  59.   (cat "Installing ums.library"
  60.   ))
  61.   (set #instumslib10
  62.   (cat "Installing ums.library ('010 version)"
  63.   ))
  64.   (set #instserver
  65.   (cat "Installing UMS Server"
  66.   ))
  67.   (set #instserver10
  68.   (cat "Installing UMS Server ('010 version)"
  69.   ))
  70.   (set #servicedrawer
  71.   (cat "In which drawer should ums.service be placed?"
  72.   ))
  73.   (set #instservice
  74.   (cat "Installing UMS Service"
  75.   ))
  76.   (set #instumsd
  77.   (cat "Installing UMS Deamon"
  78.   ))
  79.   (set #activateservice
  80.   (cat "Please activate \"ums.service\" using Envoy's \"Services Manager\""
  81.   ))
  82.   (set #updaterexxx
  83.   (cat "Updating ARexx Scripts"
  84.   ))
  85.   (set #updatescripts
  86.   (cat "Updating AmigaDOS Scripts"
  87.   ))
  88.   (set #mbdest
  89.   (cat "In which disk or drawer should the message base be placed?\n"
  90.        "(you get better performance increase if you place the "
  91.        "message base on a seperate partition with a larger block "
  92.        "size!)"
  93.   ))
  94.   (set #globconf
  95.   (cat "Now configuring global variables"
  96.   ))
  97.   (set #fullname
  98.   (cat "Please enter your full name"
  99.   ))
  100.   (set #short
  101.   (cat "Please enter your short (nick) name"
  102.   ))
  103.   (set #password
  104.   (cat "Please enter your password"
  105.   ))
  106.   (set #envexists
  107.   (cat "ENV:UMSSERVER ist already set. Overwrite this environment variable?"
  108.   ))
  109.   (set #whichserver
  110.   (cat "Please enter the name of the UMS server you want to use.\n\n"
  111.        "This name consists of two parts. The part following "
  112.        "the \"@\" sign is the name of the machine the server "
  113.        "is running on. The other part is the name of the "
  114.        "message base on this server. Use \"default\" in order "
  115.        "to get the default message base of this server."
  116.   ))
  117.   (set #confexists
  118.   (cat "ums.config already exists in your message base. Overwrite "
  119.        "this configuration file?"
  120.   ))
  121.   (set #instpaths
  122.   (cat "Installing Paths for UMS (binaries/scripts)"
  123.   ))
  124.   (set #uniquename
  125.   (cat "Please enter a unique name (domain address) for your computer\n\n"
  126.   
  127.        "For RFC-Systems it's easy: just use your fully qualified domain "
  128.        "name\n\n"
  129.  
  130.        "FTN Systems must convert their fido address to RFC style (eg. "
  131.        "\"2:2471/1216.3\" must be converted to "
  132.        "\"p3.f1216.n2471.z2.fidonet.org\"\n\n"
  133.  
  134.        "It's VERY important that you enter a correct string!"
  135.   ))
  136.   (set #envalreadyset
  137.   (cat "ENV:UMSMB.default ist already set. Overwrite this environment "
  138.        "variable?"
  139.   ))
  140.   (set #appenddb
  141.   (cat "In order to allow UMS to work with AmiTCP the files "
  142.        "\"AmiTCP:db/services\" and \"AmiTCP:db/inetd.config\" must be "
  143.        "extended. Should this be done automatically (the old files will "
  144.        "be backupped)?"
  145.   ))
  146. ;  (set #
  147. ;  (cat
  148. ;  ))
  149. ))
  150.  
  151. (transcript #intro)
  152.  
  153. (complete 0)
  154.  
  155. (message #info)
  156.  
  157. (set @default-dest
  158.   (expandpath
  159.     (askdir
  160.       (prompt #dest)
  161.       (help @askdir-help)
  162.       (default (expandpath ""))
  163.     )
  164.   )
  165. )
  166.  
  167. (set inplace (= (expandpath "") @default-dest))
  168.  
  169. (if (= inplace 0)
  170.   (
  171.     (copyfiles
  172.       (help @copyfiles-help)
  173.       (prompt #copying)
  174.       (source "")
  175.       (dest @default-dest)
  176.       (all)
  177.       (optional "force" "askuser")
  178.     )
  179.   )
  180. )
  181.  
  182. (if (<> (substr @default-dest (- (strlen @default-dest) 1) 1) ":")
  183.   (
  184.     (set @default-dest (cat @default-dest "/"))
  185.   )
  186. )
  187.  
  188.  
  189. (complete 25)
  190.  
  191. ; -------------------------------------------------------------------------
  192.  
  193. (set envoy (exists "LIBS:nipc.library"))
  194. (set amitcp (exists "AmiTCP:AmiTCP"))
  195.  
  196. (if envoy
  197.   (
  198.     (set envoyclient
  199.       (askchoice
  200.         (prompt #envoy)
  201.         (default 0)
  202.         (help @askchoices-help)
  203.         (choices #localmb
  204.                  #remotemb)
  205.       )
  206.     )
  207.     (if (= envoyclient 0)
  208.       (
  209.         (set envoyserver
  210.           (askbool
  211.             (prompt #umsservice)
  212.             (default 0)
  213.             (help @askbool-help)
  214.           )
  215.         )
  216.       )
  217.     )
  218.   )
  219.   (
  220.     (set envoyclient 0)
  221.   )
  222. )
  223.  
  224. (if amitcp
  225.   (
  226.     (if (= envoy 0)
  227.       (
  228.         (set tcpclient
  229.           (askchoice
  230.             (prompt #amitcp)
  231.             (default 0)
  232.             (help @askchoices-help)
  233.             (choices #localmb
  234.                      #remotemb)
  235.           )
  236.         )
  237.       )
  238.     )
  239.   )
  240. )
  241.  
  242. (if amitcp
  243.   (
  244.     (if (= tcpclient 0)
  245.       (
  246.         (set tcpserver
  247.           (askbool
  248.             (prompt #umsd)
  249.             (default 0)
  250.             (help @askbool-help)
  251.           )
  252.         )
  253.       )
  254.     )
  255.   )
  256.   (
  257.     (set tcpclient 0)
  258.   )
  259. )
  260.  
  261. (set client 0)
  262. (if envoyclient
  263.   (
  264.     (set client 1)
  265.   )
  266. )
  267. (if tcpclient
  268.   (
  269.     (set client 1)
  270.   )
  271. )
  272.  
  273. (complete 50)
  274.  
  275. ; -------------------------------------------------------------------------
  276.  
  277. (copylib
  278.   (help @copylib-help)
  279.   (prompt #insthgrexx)
  280.   (confirm)
  281.   (source "libs/hgrexxsupport.library")
  282.   (dest "LIBS:")
  283. )
  284.  
  285. (copylib
  286.   (help @copylib-help)
  287.   (prompt #instrexxdos)
  288.   (confirm)
  289.   (source "libs/rexxdossupport.library")
  290.   (dest "LIBS:")
  291. )
  292.  
  293. (if (= client 0)
  294.   (
  295.     (copylib
  296.       (help @copylib-help)
  297.       (prompt #instflush)
  298.       (confirm)
  299.       (source "libs/flush.library")
  300.       (dest "LIBS:")
  301.     )
  302.   )
  303. )
  304.  
  305. ; (set slowprocessor (= (database "cpu") "68000"))
  306.  
  307. (set slowprocessor 1)
  308.  
  309. ; (if slowprocessor
  310. ;   (
  311.     (copylib
  312.       (help @copylib-help)
  313.       (prompt #instumslib)
  314.       (confirm)
  315.       (source "libs/ums.library")
  316.       (dest "LIBS:")
  317.     )
  318. ;   )
  319. ;   (
  320. ;     (copylib
  321. ;       (help @copylib-help)
  322. ;       (prompt #instumslib10)
  323. ;       (confirm)
  324. ;       (source "libs/ums.library.010")
  325. ;       (newname "ums.library")
  326. ;       (dest "LIBS:")
  327. ;     )
  328. ;   )
  329. ; )
  330.  
  331. (complete 60)
  332.  
  333. (if (= client 0)
  334.   (
  335.     (if slowprocessor
  336.       (
  337.         (copylib
  338.           (help @copylib-help)
  339.           (prompt #instserver)
  340.           (confirm)
  341.           (source "l/umsserver")
  342.           (dest "L:")
  343.         )
  344.       )
  345.       (
  346.         (copylib
  347.           (help @copylib-help)
  348.           (prompt #instserver10)
  349.           (confirm)
  350.           (source "l/umsserver.nodebug010")
  351.           (newname "umsserver")
  352.           (dest "L:")
  353.         )
  354.       )
  355.     )
  356.     (if envoyserver
  357.       (
  358.         (set servicepath
  359.           (expandpath
  360.             (askdir
  361.               (prompt #servicedrawer)
  362.               (help @askdir-help)
  363.               (default "SYS:Envoy/Services")
  364.             )
  365.           )
  366.         )
  367.         (copylib
  368.           (help @copylib-help)
  369.           (prompt #instservice)
  370.           (confirm)
  371.           (infos)
  372.           (source "Envoy/services/ums.service")
  373.           (dest servicepath)
  374.         )
  375.         (message #activateservice)
  376.       )
  377.     )
  378.     (if tcpserver
  379.       (copylib
  380.         (help @copylib-help)
  381.         (prompt #instservice)
  382.         (confirm)
  383.         (infos)
  384.         (source "AmiTCP/serv/umsd")
  385.         (dest "AmiTCP:serv/")
  386.       )
  387.     )
  388.     (if (OR tcpserver tcpclient)
  389.       (
  390.         (set appenddb
  391.           (askbool
  392.             (prompt #appenddb)
  393.             (help @askbool-help)
  394.           )
  395.         )
  396.         (if appenddb
  397.           (
  398.             (rename "AmiTCP:db/services" "AmiTCP:db/services.bak")
  399.             (rename "AmiTCP:db/inetd.conf" "AmiTCP:db/inetd.conf.bak")
  400.             (textfile
  401.               (dest "AmiTCP:db/services")
  402.               (include "AmiTCP:db/services.bak")
  403.               (include "AmiTCP/db/services")
  404.             )
  405.             (textfile
  406.               (dest "AmiTCP:db/inetd.conf")
  407.               (include "AmiTCP:db/inetd.conf.bak")
  408.               (include "AmiTCP/db/inetd.conf")
  409.             )
  410.           )
  411.         )
  412.       )
  413.     )
  414.   )
  415. )
  416.  
  417. (complete 70)
  418.  
  419. ; -------------------------------------------------------------------------
  420.  
  421. (if (= envoyclient 0)
  422.   (
  423.     (set writeit 1)
  424.  
  425.     (if (= (exists "ENV:UMSMB.default") 1)
  426.       (
  427.         (set writeit
  428.           (askbool
  429.             (prompt #envalreadyset)
  430.             (help @askbool-help)
  431.           )
  432.         )
  433.       )
  434.     )
  435.  
  436.     (if writeit
  437.       (
  438.         (makedir (tackon @default-dest "mb"))
  439.         (set mbpath (tackon @default-dest "mb/"))
  440.  
  441.         (set mbpath
  442.           (expandpath
  443.             (askdir
  444.               (prompt #mbdest)
  445.               (help @askdir-help)
  446.               (default mbpath)
  447.             )
  448.           )
  449.         )
  450.         (textfile
  451.           (dest "ENV:UMSMB.default")
  452.           (append mbpath)
  453.         )
  454.  
  455.         (textfile
  456.           (dest "ENVARC:UMSMB.default")
  457.           (append mbpath)
  458.         )
  459.       )
  460.       (
  461.         (set mbpath (getenv "UMSMB.default"))
  462.       )
  463.     )
  464.   )
  465. )
  466.  
  467. (complete 80)
  468.  
  469. ; -------------------------------------------------------------------------
  470.  
  471. (set serverdefault "")
  472.  
  473. (if (= envoyclient 1)
  474.   (
  475.     (set serverdefault "default@envoyserver")
  476.   )
  477. )
  478.  
  479. (if (= tcpclient 1)
  480.   (
  481.     (set tcpdefault "host.do.main:ums")
  482.   )
  483. )
  484.  
  485. (if (<> serverdefault "")
  486.   (
  487.     (set writeit 1)
  488.     (if (= (exists "ENV:UMSSERVER") 1)
  489.       (
  490.         (set writeit
  491.           (askbool
  492.             (prompt #envexists)
  493.             (help @askbool-help)
  494.           )
  495.         )
  496.       )
  497.     )
  498.     (if writeit
  499.       (
  500.         (set umsserver
  501.           (askstring
  502.             (prompt #whichserver)
  503.             (default serverdefault)
  504.             (help @askstring-help)
  505.           )
  506.         )
  507.         (textfile
  508.           (dest "ENV:UMSSERVER")
  509.           (append umsserver)
  510.         )
  511.         (textfile
  512.           (dest "ENVARC:UMSSERVER")
  513.           (append umsserver)
  514.         )
  515.       )
  516.     )
  517.   )
  518. )
  519.  
  520. (complete 90)
  521.  
  522. ; -------------------------------------------------------------------------
  523.  
  524. (if (= client 0)
  525.   (
  526.     (set writeit 1)
  527.  
  528.     (if (= (exists (tackon mbpath "ums.config")) 1)
  529.       (
  530.         (set writeit
  531.           (askbool
  532.             (prompt #confexists)
  533.             (help @askbool-help)
  534.           )
  535.         )
  536.       )
  537.     )
  538.   )
  539.   (
  540.     (set writeit 0)
  541.   )
  542. )
  543.  
  544. (if writeit
  545.   (
  546.     (message #globconf)
  547.  
  548.     (set username
  549.       (askstring
  550.         (prompt #fullname)
  551.         (help @askstring-help)
  552.         (default "Joe User")
  553.       )
  554.     )
  555.  
  556.     (set shortusername
  557.       (askstring
  558.         (prompt #shortname)
  559.         (help @askstring-help)
  560.         (default "joe")
  561.       )
  562.     )
  563.  
  564.     (set password
  565.       (askstring
  566.         (prompt #password)
  567.         (help @askstring-help)
  568.         (default "joshua")
  569.       )
  570.     )
  571.  
  572.     (set domainaddress
  573.       (askstring
  574.         (prompt #uniquename)
  575.         (help @askstring-help)
  576.         (default "mycomputer.foo.bar")
  577.       )
  578.     )
  579.     (textfile
  580.       (dest (tackon mbpath "ums.config"))
  581.       (append (cat "( SysName \"" domainaddress "\" )\n\n"))
  582.       (append (cat "( LogFile \"" (tackon @default-dest "ums.log") "\" )\n\n"))
  583.       (append "( Sysop\n")
  584.       (append (cat "  ( Name \"" username "\" )\n"))
  585.       (append (cat "  ( Alias\n      \"" shortusername "\"\n"))
  586.       (append "      \"sysop\"\n")
  587.       (append "      \"root\"\n")
  588.       (append "      \"postmaster\"\n  )\n")
  589.       (append (cat "  ( Password \"" password "\" )\n"))
  590.       (append "  ( ReadAccess \"#?\" )\n")
  591.       (append "  ( WriteAccess \"#?\" )\n")
  592.       (append "  ( NetAccess \"#?\" )\n")
  593.       (append ")\n")
  594.     )
  595.   )
  596. )
  597.  
  598. (startup "UMS"
  599.   (prompt #instpaths)
  600.   (help @startup-help)
  601.   (set path (cat "\""     (expandpath (tackon @default-dest "bin")) "\"" ))
  602.   (set path (cat path " \"" (expandpath (tackon @default-dest "rexx")) "\"" ))
  603.   (command (cat "Path " path " ADD\n"))
  604. )
  605.  
  606. (complete 100)
  607.  
  608. (exit)
  609.